# Project: validXML
# pour lancer la generation a partir de lex et yacc

#####VARIABLE########
FILEFLEX      = validateurXML.l
FILEBISON     = validateurXML.y
BIN           = validateurXML.exe

CC            = g++

OBJ           = y.tab.o lex.yy.o $(RES)
LINKOBJ       = y.tab.o lex.yy.o $(RES)

RM            = rm -f
#############

.PHONY: all all-before all-after clean clean-custom

all: all-before $(BIN) all-after


clean: clean-custom
	${RM} $(OBJ) $(BIN)

$(BIN): pre $(OBJ)
	$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)

pre :
	bison -ydtv $(FILEBISON)
	flex $(FILEFLEX)

y.tab.o: y.tab.c
	$(CC) -c y.tab.c -o y.tab.o $(CFLAGS)


lex.yy.o: lex.yy.c
	$(CC) -c lex.yy.c -o lex.yy.o $(CFLAGS)

